package com.ityedao.IO框架;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

public class Test {
    public static void main(String[] args) throws IOException {
//        FileUtils.copyFile(new File("src\\ityedao.txt"), new File("src\\ityedao-框架-复制.txt"));
//        FileUtils.copyDirectory(new File("D:\\A-IOtest\\test2"), new File("D:\\A-IOtest\\test-copy"));
//        FileUtils.deleteDirectory(new File("D:\\A-IOtest\\test-copy"));

        // Java提供的原生的一行代码搞定很多事情
//        Files.copy(Path.of("D:\\A-IOtest\\test2"), Path.of("D:\\A-IOtest\\test2-copy"));
        System.out.println(Files.readString(Path.of("src\\ityedao.txt")));

    }
}
